let Build = require("../build/build");
const build = new Build();
let Builder = require("../builder/RoomOptonBuilder");
const Define = require("../define");
let utils = require("../utils/utils");

let debug = true;
let tea = true;

const args = process.argv;
if (args.length > 2) {
    debug = args[2] == "true";
    tea = args[3] == "true";
}
const project = Define.PROJECT;
const game = `/Users/wuhaotian/work/cocos/${project}/assets/bundles/subgame/`;
const test = "/Users/wuhaotian/work/cocos/dev_client/files/new/";
const infoName = "GameInfo.json";
const input = "/Users/wuhaotian/work/res/h5_game_config/hz_release/room_option/";
const output = game;
const output_debug = "/Users/wuhaotian/work/cocos/dev_client/files/new/";
const temp = `/Users/wuhaotian/work/cocos/${project}/assets/bundles/subgame/mengqi_hebei/`;
const unable = Define.DIRS_ONLINE;
const unable_tea = Define.DIRS_ONLINE;
const limit = Define.DIRS_LIMIT_SUBGAME_DEBUG;
const limit_release = Define.DIRS_LIMIT_SUBGAME;

build.run(
    debug ? test : game,
    infoName,
    input,
    debug ? output_debug : output,
    temp,
    debug ? limit : limit_release,
    tea ? unable_tea : unable,
    Builder,
    tea
);
